using Arcane.Source.Client;
using Arcane.Source.Data;
using Arcane.Source.MainMenu;
using Godot;

namespace Arcane.Source
{
    public partial class ArcaneClient : GameOS
    {
        private Control _quitAlert;
        public override void _Ready()
        {
            GameDB.Init();
            base._Ready();
            

            PushContext(new MainMenuContext());

            _quitAlert = new DialogBuilder()
                .WithMessage("QUIT ?")
                .AddButton("No", HideAlert)
                .AddButton("Yes", Quit)
                .Build(new Color(0x333333ff));
        }

        protected override void RequestQuit()
        {
            if (!Alerting)
                ShowAlert(_quitAlert);
        }
    }
}